import { pa, ro } from 'element-plus/es/locales.mjs'
import http from '../utils/request'

//登录
function login(adminname: string, password: String) {
  return http({
    url: '/admin/admin/login',
    method: 'post',
    data: {
      adminname,
      password,
    },
  })
}
//管理员列表
function adminList() {
  return http({
    url: '/admin/admin/list',
    method: 'get',
  })
}

//管理员删除
function adminDel(adminid: string) {
  return http({
    url: '/admin/admin/delete',
    method: 'post',
    data: {
      adminid
    }
  })
}
//管理员编辑

function adminEdit(obj: object) {
  return http({
    url: '/admin/admin/update',
    method: 'post',
    data: obj
  })
}
//管理员添加
function adminAdd(obj: object) {
  return http({
    url: '/admin/admin/add',
    method: 'post',
    data: obj
  })
}
export { login, adminList, adminDel, adminEdit, adminAdd }
